package com.dy.agent.agent.api;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

/**
 * Created by huangxin on 2016/8/30.
 */
@SpringBootApplication
public class ApplicationLauncher {
	private static ApplicationContext ac;

	public static void main(String[] args) {
		ac = SpringApplication.run(ApplicationLauncher.class, args);
		Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
			@Override
			public void run() {
				SpringApplication.exit(ac);
			}
		}));
	}
}